package Meituan.Feature;

import com.google.common.base.Splitter;
import org.apache.commons.lang3.StringUtils;

import java.util.List;

/**
 * 特征格式化
 * 以sg_mkt开发，
 * @author: leiwenkang
 * @date: 2020/4/24
 * @time: 15:49
 */
public class FeatureKV {
    public static void main(String[] args) {
        String str = "DAY_OF_WEEK:-70000.0\n" +
                "\n" +
                "IS_DAY_OF_WEEK_END:-70000.0\n" +
                "\n" +
                "ALL_CK_7DAYS:-70000.0\n" +
                "\n" +
                "ALL_CK_30DAYS:-70000.0\n" +
                "\n" +
                "ALL_CK_90DAYS:-70000.0\n" +
                "\n" +
                "ALL_CK_RATE_7_30DAYS:-70000.0\n" +
                "\n" +
                "ALL_CK_RATE_30_90DAYS:-70000.0\n" +
                "\n" +
                "ALL_CK_RATE_7_90DAYS:-70000.0\n" +
                "\n" +
                "MT_AGE:-70000.0\n" +
                "\n" +
                "MT_GENDER:-70000.0\n" +
                "\n" +
                "MT_IS_STUDENT:-70000.0\n" +
                "\n" +
                "MT_IS_WHITE_COLLAR:-70000.0\n" +
                "\n" +
                "MT_EDU_LEVEL:-70000.0\n" +
                "\n" +
                "MT_SALARY_LEVEL:-70000.0\n" +
                "\n" +
                "MT_MARITAL_STATUS:-70000.0\n" +
                "\n" +
                "MT_HAVE_CHILD:-70000.0\n" +
                "\n" +
                "MT_CONSUME_STYLE:-70000.0\n" +
                "\n" +
                "END_ORDER_SOURCE:-70000.0\n" +
                "\n" +
                "CNT_7DAYS:-70000.0\n" +
                "\n" +
                "CNT_30DAYS:-70000.0\n" +
                "\n" +
                "CNT_90DAYS:-70000.0\n" +
                "\n" +
                "END_ORDER_DT:-70000.0\n" +
                "\n" +
                "FIRST_ORDER_DT:-70000.0\n" +
                "\n" +
                "END_AOR_TYPE:-70000.0\n" +
                "\n" +
                "FIRST_AOR_TYPE:-70000.0\n" +
                "\n" +
                "DATE_FST_TO_NOW:-70000.0\n" +
                "\n" +
                "DATE_END_TO_NOW:-70000.0\n" +
                "\n" +
                "DAZHONGAPP:-70000.0\n" +
                "\n" +
                "ELEME:-70000.0\n" +
                "\n" +
                "MEITUANWAIMAI:-70000.0\n" +
                "\n" +
                "MEITUANAPP:-70000.0\n" +
                "\n" +
                "JDDJAPP:-70000.0\n" +
                "\n" +
                "CHURN_RATE:-70000.0\n" +
                "\n" +
                "ORD_NUM_TOTAL:-70000.0\n" +
                "\n" +
                "ORD_AMT_TOTAL:-70000.0\n" +
                "\n" +
                "PAY_AMT_TOTAL:-70000.0\n" +
                "\n" +
                "MAX_PRICE:-70000.0\n" +
                "\n" +
                "MIN_PRICE:-70000.0\n" +
                "\n" +
                "WEEKEND_MIN_PRICE:-70000.0\n" +
                "\n" +
                "AVG_SUB_ORD_AMT_TOTAL:-70000.0\n" +
                "\n" +
                "AVG_ORD_AMT:-70000.0\n" +
                "\n" +
                "AVG_PAY_AMT:-70000.0\n" +
                "\n" +
                "AVG_ORD_NUM_7DAYS:-70000.0\n" +
                "\n" +
                "AVG_ORD_NUM_30DAYS:-70000.0\n" +
                "\n" +
                "AVG_ORD_NUM_90DAYS:-70000.0\n" +
                "\n" +
                "ALPHAU2_FLAG:-70000.0\n" +
                "\n" +
                "COUNT_NOFEE_ORDER_NUM:-70000.0\n" +
                "\n" +
                "ACT_COST_RATE:-70000.0\n" +
                "\n" +
                "IS_RECEIVE_RED_7DAYS:-70000.0\n" +
                "\n" +
                "IS_CHEAT:-70000.0\n" +
                "\n" +
                "CANCEL_ORD_TOTAL_RATE:-70000.0\n" +
                "\n" +
                "SG_AOR_NEW_UV:-70000.0\n" +
                "\n" +
                "SG_AOR_SG_FIRST_ORD_UV:-70000.0\n" +
                "\n" +
                "SG_AOR_CONVERSION_RATE:-70000.0\n" +
                "\n" +
                "SG_AOR_CITY_NEW_UV:-70000.0\n" +
                "\n" +
                "SG_AOR_CITY_SG_FIRST_ORD_UV:-70000.0\n" +
                "\n" +
                "SG_AOR_CITY_CONVERSION_RATE:-70000.0\n" +
                "\n" +
                "SG_AOR_CITY_CONVERSION_RATIO:-70000.0\n" +
                "\n" +
                "SG_AOR_RATIO_PERCENT:-70000.0\n" +
                "\n" +
                "SG_AOR_CAC:-70000.0\n" +
                "\n" +
                "SG_AOR_ORDER_UV:-70000.0\n" +
                "\n" +
                "SG_AOR_DISCOUNT_AMT:-70000.0\n" +
                "\n" +
                "SG_AOR_POI_CHARGE_AMT:-70000.0\n" +
                "\n" +
                "SG_AOR_AGENT_CHARGE_AMT:-70000.0\n" +
                "\n" +
                "SG_AOR_NMD_CHARGE_AMT:-70000.0\n" +
                "\n" +
                "SG_AOR_OUTER_CHANNEL_CHARGE_AMT:-70000.0\n" +
                "\n" +
                "SG_AOR_SG_CHARGE_AMT:-70000.0\n" +
                "\n" +
                "SG_AOR_ORIGINAL_PRICE:-70000.0\n" +
                "\n" +
                "SG_AOR_ACTUAL_PRICE:-70000.0\n" +
                "\n" +
                "SG_AOR_POI_NUM:-70000.0\n" +
                "\n" +
                "SG_CITY_CAC:-70000.0\n" +
                "\n" +
                "SG_CITY_POI_RATE:-70000.0\n" +
                "\n" +
                "SG_CITY_MTDP_RATE:-70000.0\n" +
                "\n" +
                "SG_CITY_SG_RATE:-70000.0\n" +
                "\n" +
                "SG_CITY_ORDER_UV:-70000.0\n" +
                "\n" +
                "SG_CITY_DISCOUNT_AMT:-70000.0\n" +
                "\n" +
                "SG_CITY_POI_CHARGE_AMT:-70000.0\n" +
                "\n" +
                "SG_CITY_AGENT_CHARGE_AMT:-70000.0\n" +
                "\n" +
                "SG_CITY_NMD_CHARGE_AMT:-70000.0\n" +
                "\n" +
                "SG_CITY_OUTER_CHANNEL_CHARGE_AMT:-70000.0\n" +
                "\n" +
                "SG_CITY_SG_CHARGE_AMT:-70000.0\n" +
                "\n" +
                "SG_CITY_ORIGINAL_PRICE:-70000.0\n" +
                "\n" +
                "SG_CITY_ACTUAL_PRICE:-70000.0\n" +
                "\n" +
                "SG_CITY_POI_NUM:-70000.0\n" +
                "\n" +
                "SG_CITY_AOR_NUM:-70000.0\n" +
                "\n" +
                "SEARCH_CNT_IN_3_MONTH:-70000.0\n" +
                "\n" +
                "SEARCH_CNT_IN_2_MONTH:-70000.0\n" +
                "\n" +
                "SEARCH_CNT_IN_1_MONTH:-70000.0\n" +
                "\n" +
                "SEARCH_CNT_IN_2_WEEK:-70000.0\n" +
                "\n" +
                "SEARCH_CNT_IN_1_WEEK:-70000.0\n" +
                "\n" +
                "CLICK_CNT_IN_3_MONTH:-70000.0\n" +
                "\n" +
                "CLICK_CNT_IN_2_MONTH:-70000.0\n" +
                "\n" +
                "CLICK_CNT_IN_1_MONTH:-70000.0\n" +
                "\n" +
                "CLICK_CNT_IN_2_WEEK:-70000.0\n" +
                "\n" +
                "CLICK_CNT_IN_1_WEEK:-70000.0\n" +
                "\n" +
                "VIEW_CNT_IN_3_MONTH:-70000.0\n" +
                "\n" +
                "VIEW_CNT_IN_2_MONTH:-70000.0\n" +
                "\n" +
                "VIEW_CNT_IN_1_MONTH:-70000.0\n" +
                "\n" +
                "VIEW_CNT_IN_2_WEEK:-70000.0\n" +
                "\n" +
                "VIEW_CNT_IN_1_WEEK:-70000.0\n" +
                "\n" +
                "ORD_CNT_IN_3_MONTH:-70000.0\n" +
                "\n" +
                "ORD_CNT_IN_2_MONTH:-70000.0\n" +
                "\n" +
                "ORD_CNT_IN_1_MONTH:-70000.0\n" +
                "\n" +
                "ORD_CNT_IN_2_WEEK:-70000.0\n" +
                "\n" +
                "ORD_CNT_IN_1_WEEK:-70000.0\n" +
                "\n" +
                "LATENT_PROB:-70000.0\n" +
                "\n" +
                "COUPON_AMOUNT:-70000.0\n" +
                "\n" +
                "ENTRY_EXPOSE_PV:-70000.0\n" +
                "\n" +
                "ENTRY_CLICK_PV:-70000.0\n" +
                "\n" +
                "HOME_PAGE_EXPOSE_PV:-70000.0\n" +
                "\n" +
                "SUBMIT_PAGE_EXPOSE_PV:-70000.0\n" +
                "\n" +
                "SUBMITTED_PV:-70000.0\n" +
                "\n" +
                "LABEL_R:-70000.0\n" +
                "\n" +
                "WORK_DAY_CNT:-70000.0\n" +
                "\n" +
                "WEEKEND_AM_DAY_CNT:-70000.0\n" +
                "\n" +
                "WEEKEND_PM_DAY_CNT:-70000.0\n" +
                "\n" +
                "MORNING_CNT:-70000.0\n" +
                "\n" +
                "NIGHT_CNT:-70000.0\n" +
                "\n" +
                "LINGQU_CNT:-70000.0\n" +
                "\n" +
                "LINGQU_COUPON_AMOUNT:-70000.0\n" +
                "\n" +
                "USE_CNT:-70000.0\n" +
                "\n" +
                "USE_COUPON_AMOUNT:-70000.0\n" +
                "\n" +
                "LINGQU_USE_RATE:-70000.0\n" +
                "\n" +
                "CLICK_NUM:-70000.0\n" +
                "\n" +
                "EXPOSE_NUM:-70000.0\n" +
                "\n" +
                "POI_HOME_NUM:-70000.0\n" +
                "\n" +
                "P_SUBMIT_ORDER_NUM:-70000.0\n" +
                "\n" +
                "AVG_SUBMIT_ORIGINAL_PRICE:-70000.0\n" +
                "\n" +
                "SUBMIT_ORD_NUM:-70000.0\n" +
                "\n" +
                "PUSH_ORD_NUM:-70000.0\n" +
                "\n" +
                "THIRD_CATE_SCORE:-70000.0\n" +
                "\n" +
                "KA_SCORE:-70000.0\n" +
                "\n" +
                "CKA_SCORE:-70000.0\n" +
                "\n" +
                "SANDIAN_SCORE:-70000.0\n" +
                "\n" +
                "CAT_20_SCORE:-70000.0\n" +
                "\n" +
                "CAT_21_SCORE:-70000.0\n" +
                "\n" +
                "CAT_22_SCORE:-70000.0\n" +
                "\n" +
                "CAT_1001_SCORE:-70000.0\n" +
                "\n" +
                "CAT_5001_SCORE:-70000.0\n" +
                "\n" +
                "SEARCH_CNT_IN_3_MONTH:-70000.0\n" +
                "\n" +
                "SEARCH_CNT_IN_2_MONTH:-70000.0\n" +
                "\n" +
                "SEARCH_CNT_IN_1_MONTH:-70000.0\n" +
                "\n" +
                "SEARCH_CNT_IN_2_WEEK:-70000.0\n" +
                "\n" +
                "SEARCH_CNT_IN_1_WEEK:-70000.0\n" +
                "\n" +
                "VIEW_CNT_IN_3_MONTH:-70000.0\n" +
                "\n" +
                "VIEW_CNT_IN_2_MONTH:-70000.0\n" +
                "\n" +
                "VIEW_CNT_IN_1_MONTH:-70000.0\n" +
                "\n" +
                "VIEW_CNT_IN_2_WEEK:-70000.0\n" +
                "\n" +
                "VIEW_CNT_IN_1_WEEK:-70000.0\n" +
                "\n" +
                "ORD_CNT_IN_3_MONTH:-70000.0\n" +
                "\n" +
                "ORD_CNT_IN_2_MONTH:-70000.0\n" +
                "\n" +
                "ORD_CNT_IN_1_MONTH:-70000.0\n" +
                "\n" +
                "ORD_CNT_IN_2_WEEK:-70000.0\n" +
                "\n" +
                "ORD_CNT_IN_1_WEEK:-70000.0\n" +
                "\n" +
                "ORD_NUM_90DAY:-70000.0\n" +
                "\n" +
                "AVG_PRICE_90DAY:-70000.0\n" +
                "\n" +
                "MEDIAN_PRICE_90DAY:-70000.0\n" +
                "\n" +
                "SUM_AMT_90DAY:-70000.0\n" +
                "\n" +
                "AGGREREDEEM:-70000.0\n" +
                "\n" +
                "ORDER_CNT_180DAYS:-70000.0\n" +
                "\n" +
                "SENSI_SCORE:-70000.0\n" +
                "\n" +
                "MT_DAOZONG_SCORE:-70000.0\n" +
                "\n" +
                "MT_HOTEL_SCORE:-70000.0\n" +
                "\n" +
                "MT_MAOYAN_SCORE:-70000.0\n" +
                "\n" +
                "MT_WAIMAI_SCORE:-70000.0\n" +
                "\n" +
                "MT_DAOCAN_SCORE:-70000.0\n" +
                "\n" +
                "MT_WAIMAI_P:-70000.0\n" +
                "\n" +
                "MT_IS_TOUCH:-70000.0\n" +
                "\n" +
                "MT_PUSH_SENSITIVITY_SCORE:-70000.0\n" +
                "\n" +
                "CONSUME_WAIMAI_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_DAOCAN_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_MAOYAN_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_ENJOY_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_HOTEL_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_JINGNEI_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_BEAUTY_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_TRAFFIC_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_PEISONG_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_MARRIAGE_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_JINGWAI_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_GOUWU_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_HOMEEDU_LEVEL:-70000.0\n" +
                "\n" +
                "CONSUME_ZHENGUO_LEVEL:-70000.0\n" +
                "\n" +
                "WAIMAI_M_SCORE:-70000.0\n" +
                "\n" +
                "WAIMAI_R_SCORE:-70000.0\n" +
                "\n" +
                "WAIMAI_F_SCORE:-70000.0\n" +
                "\n" +
                "WAIMAI_RE_SCORE:-70000.0\n" +
                "\n" +
                "DAOCAN_M_SCORE:-70000.0\n" +
                "\n" +
                "DAOCAN_R_SCORE:-70000.0\n" +
                "\n" +
                "DAOCAN_F_SCORE:-70000.0\n" +
                "\n" +
                "DAOCAN_RE_SCORE:-70000.0\n" +
                "\n" +
                "DAOZONG_M_SCORE:-70000.0\n" +
                "\n" +
                "DAOZONG_R_SCORE:-70000.0\n" +
                "\n" +
                "DAOZONG_F_SCORE:-70000.0\n" +
                "\n" +
                "DAOZONG_RE_SCORE:-70000.0\n" +
                "\n" +
                "HOTEL_M_SCORE:-70000.0\n" +
                "\n" +
                "HOTEL_R_SCORE:-70000.0\n" +
                "\n" +
                "HOTEL_F_SCORE:-70000.0\n" +
                "\n" +
                "HOTEL_RE_SCORE:-70000.0\n" +
                "\n" +
                "MAOYAN_M_SCORE:-70000.0\n" +
                "\n" +
                "MAOYAN_R_SCORE:-70000.0\n" +
                "\n" +
                "MAOYAN_F_SCORE:-70000.0\n" +
                "\n" +
                "MAOYAN_RE_SCORE:-70000.0\n" +
                "\n" +
                "PUSH_ARRIVE_NUM_1DAY:-70000.0\n" +
                "\n" +
                "PUSH_CLICK_NUM_1DAY:-70000.0\n" +
                "\n" +
                "PUSH_ORDER_NUM_1DAY:-70000.0\n" +
                "\n" +
                "PUSH_CTR_1DAY:-70000.0\n" +
                "\n" +
                "PUSH_CXR_1DAY:-70000.0\n" +
                "\n" +
                "PUSH_ARRIVE_NUM_7DAY:-70000.0\n" +
                "\n" +
                "PUSH_CLICK_NUM_7DAY:-70000.0\n" +
                "\n" +
                "PUSH_ORDER_NUM_7DAY:-70000.0\n" +
                "\n" +
                "PUSH_CTR_7DAY:-70000.0\n" +
                "\n" +
                "PUSH_CXR_7DAY:-70000.0\n" +
                "\n" +
                "PUSH_ARRIVE_NUM_30DAY:-70000.0\n" +
                "\n" +
                "PUSH_CLICK_NUM_30DAY:-70000.0\n" +
                "\n" +
                "PUSH_ORDER_NUM_30DAY:-70000.0\n" +
                "\n" +
                "PUSH_CTR_30DAY:-70000.0\n" +
                "\n" +
                "PUSH_CXR_30DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_ARRIVE_NUM_1DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_CLICK_NUM_1DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_ORDER_NUM_1DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_CTR_1DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_CXR_1DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_ARRIVE_NUM_7DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_CLICK_NUM_7DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_ORDER_NUM_7DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_CTR_7DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_CXR_7DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_ARRIVE_NUM_30DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_CLICK_NUM_30DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_ORDER_NUM_30DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_CTR_30DAY:-70000.0\n" +
                "\n" +
                "SG_PUSH_CXR_30DAY:-70000.0\n" +
                "\n" +
                "COUPON_CK_NUM_30DAY:-70000.0\n" +
                "\n" +
                "CK_NUM_30DAY:-70000.0\n" +
                "\n" +
                "COUPON_PAGE_NUM_30DAY:-70000.0\n" +
                "\n" +
                "COUPON_CK_NUM_7DAY:-70000.0\n" +
                "\n" +
                "CK_NUM_7DAY:-70000.0\n" +
                "\n" +
                "COUPON_PAGE_NUM_7DAY:-70000.0\n" +
                "\n" +
                "COUPON_CK_NUM_1DAY:-70000.0\n" +
                "\n" +
                "CK_NUM_1DAY:-70000.0\n" +
                "\n" +
                "COUPON_PAGE_NUM_1DAY:-70000.0";
        formatFeature(str);

    }

    private static void formatFeature(String str) {
        if (StringUtils.isBlank(str)) {
            return;
        }

        List<String> list = Splitter.on("\n").splitToList(str);
        for (String featureValue: list) {
            if (StringUtils.isBlank(featureValue)) {
                continue;
            }
            String featureName = featureValue.trim();
//            if (featureName.startsWith("user_ups")) {
//                featureName = featureName.substring(9);
//            }
//            System.out.println(featureName);
            System.out.println(featureName.toLowerCase());
        }

    }


}
